
*************************************************************************
* Author:		MA, CYC, JU, KG, AJ
* Project name:		Indicators
* File name:		ReadMe.txt
* Institution:		Pitt, UCLA, Columbia, CEEW	
* Start of project: 	Sept 14, 2016
* Project purpose:	Determinants of energy satisfaction in India
* File purpose:		Read me for the replication package for Nature
*			Energy
*************************************************************************

Table of contents:
1. Introduction
2. Replication procedure
3. Merging Household and Village data
4. Census data


*************************************************************************
*	1. Introduction
*************************************************************************

This file is the ReadMe.txt for the replication package of our Nature Energy article. The zip file contains the following files:

- ReadMe.txt. This file.

- Codebook.pdf. A pdf file that contains the description of all variables as well as a presentation of the most important identifiers. 

- HouseholdVillage.pdf: a pdf that contains the questionnaire for both the household- and the village-level data. 

- RawDataHH.dta: a Stata (version 12) dataset containing the raw data at the household level.

- ReplicationIndicatorsCoding.do: a Stata .do file that transforms RawDataHH.dta (the raw data) into the version needed for replication of our results.

- ReplicationIndicatorsData.dta: the Stata (version 12) dataset that was used for the analysis. 

- ReplicationIndicatorsAnalysis.do: a Stata .do file that conducts all the analyses reported in the manuscript and the supplementary material. 

- RawDataVillage.dta: a Stata (version 12) dataset containing the raw data at the village level.

- CensusData2011.dta: a Stata (version 12) dataset containing data from the census. 

- Sampling_ACCESS.pdf: a pdf that describes the sampling strategy used to select districts, villages, and households. 


*************************************************************************
*	2. Replication procedure
*************************************************************************

(1) Download the zip file and open it. 
(2a) The entire replication can be run from ReplicationIndicatorsAnalysis.do. The first lines of code force Stata to run ReplicationIndicatorsCoding.do, which will create all variables needed for the analysis. 
(2b) Alternatively, you can also open ReplicationIndicatorsCoding.do and run it first, then run ReplicationIndicatorsAnalysis.do. 
(3) If you don’t have any reason to change the coding of any variable, then you can directly work with ReplicationIndicatorsData.dta, which is the final dataset (i.e. the one obtained after running ReplicationIndicatorsCoding.do). 

Note: you may have to change the path to the folder with all these documents. You can do so on line 23 of ReplicationIndicatorsAnalysis.do. 

You can also change the path to the place where all tables/figures will be saved. As it stands, all tables and figures will be saved in the folder in which all the files are located. You can change the code on line 29. 


*************************************************************************
*	3. Merging Household and Village data
*************************************************************************

The two datasets contain a unique village identifier called VillageID. 

To merge the two datasets:

use “RawDataHH.dta”, clear
merge m:1 VillageId using “RawDataVillage.dta”


*************************************************************************
*	4. Census data
*************************************************************************

The CensusData2011.dta contains information from the 2011 census. This dataset is used in the ReplicationIndicatorsAnalysis.do file (line 1138) and allows us to cross-validate our data on duration of electricity with data from the census. 


